<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="../css/ui-box.css">
    <link rel="stylesheet" href="../css/ui-base.css">
    <link rel="stylesheet" href="../css/ui-color.css">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/img.css">

    <script src="../js/core/zy_control.js"></script>
    <script src="../js/core/zy_click.js"></script>
    <script src="../js/core/appframework.js"></script>
    <script src="../js/core/jquery.touchSwipe.min.js"></script>
    <script src="../js/core/iscroll.js"></script>
    <script src="../js/core/slide.js"></script>
    <script src="../js/main.js"></script>
    <script src="../js/core.js"></script>
    <script src="../js/res.js"></script>
    <script src="../js/search.js"></script>
</head>
<body class="ub ub-ver">
    <div id="header" class="ub c-bla t-wh">
        <div id="leftBtn" class="uw3 ub ub-ac" style="margin-top: 0.6em; margin-bottom: 0.6em;" ontouchstart="zy_touch();" onclick="WinClose();">
            <div class="uw1 uh2 ub-img1 im_back1 uml_1"></div>
        </div>
        <div class="ub ub-f1">
            <div class="ub ub-ac" style="z-index: 999;">
                <!--<div class="ub uw1p5 uh1p5 umar-r ub-img7" style="background-image: url('../img/search.png');" ontouchstart="zy_touch();" onclick="search();"></div>-->
                <input id="searchInput" placeholder="请输入电话号码/昵称搜索" type="text" class="input t_input ulev-1 c_wht" style="width: 130%;"/>
                <div class="ub uw1p5 uh1p5 uml_4p5 ub-img7" style="background-image: url('../img/search.png');" ontouchstart="zy_touch();" onclick="search();"></div>
                <!--<div class="ub uw1 uh1" style="background-image: url('../img/index-delete.png'); background-size: 100% 100%; position: absolute; top:30%; right: -40%;" ontouchstart="zy_touch();" onclick="clearSearch();"></div>-->
            </div>    
            <div class="b_gra signup_input_ctn2"></div>
         </div>   
    </div>
    <div id="content" style="z-index:1;" class="ub ub-f1 ub-ver">
    </div>   
</body>
</html>
<script>
function clearSearch(){
    $("#searchInput").val("");
}
zy_init();

function search(){
    if(!IsDefine($("#searchInput").val())){
      (CurrentUser.category==30?$alert("电话号码或昵称不能为空"):$alertEn("Telephone or name is not empty"));
       return;
    }
    var data = new Object();
    var dd = $("#searchInput").val();
    
    data.searchInput = dd.replace(/\s/g,""); 
    SetLS("searchInput", dd);
    data.category = CurrentUser.category;
    $ajax({
        url:"/user/shP", 
        data:data, 
        success:function(res){
           var s = IsDefine(res.result); 
           if(!s){
               if(CurrentUser.category==30){
                   return $alert("亲，没有搜索到你要查询的好友");
               }else if(CurrentUser.category==20){
                   return $alertEn("Pro, do not search for your query to the friends");
               }
           }
           
           //把获取s数据放到缓存
            SetLS("searchUser", res.result);
         //  叫浮动窗口s  showPerson   方法 在执行一遍    CCall（“showPerson”）；
            CCall('Search.showPerson()'); 
        }
    });      
    
   
}
window.uexOnload = function(type){
    if (!type) {
        Add20ToHeader();
        Zycon("search_content", $("#header").outerHeight());
    }
    //隐藏
    uexWindow.setWindowScrollbarVisible(false);
}
</script>